package com.centaline.androidsalesblog.api.usercenter;

import com.android.volley.Request;
import com.centaline.androidsalesblog.api.UserCenterApi;
import com.centaline.androidsalesblog.constants.AppConstant;
import com.centaline.androidsalesblog.model.responseobject.UserRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 修改用户信息
 * Created by Lihq on 2016/1/13.
 */
public class UpdateUserInfoApi extends UserCenterApi<UserRo> {

    private String userId;
    private String nickName;
    private String email;
    private String phone;
    private String sinaAccount;
    private String QQAccount;
    private String WeiXinAccount;
    private String isPushPost;
    private String isPushEstate;
    private String isPushChat;
    private String isPushSystemMsg;

    public UpdateUserInfoApi(Class<?> tag, Class<UserRo> aClass, IResponseListener<UserRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setIsPushPost(String isPushPost) {
        this.isPushPost = isPushPost;
    }

    public void setIsPushEstate(String isPushEstate) {
        this.isPushEstate = isPushEstate;
    }

    public void setIsPushChat(String isPushChat) {
        this.isPushChat = isPushChat;
    }

    public void setIsPushSystemMsg(String isPushSystemMsg) {
        this.isPushSystemMsg = isPushSystemMsg;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setSinaAccount(String sinaAccount) {
        this.sinaAccount = sinaAccount;
    }

    public void setQQAccount(String QQAccount) {
        this.QQAccount = QQAccount;
    }

    public void setWeiXinAccount(String weiXinAccount) {
        WeiXinAccount = weiXinAccount;
    }

    @Override
    public int getMethod() {
        return Request.Method.POST;
    }

    @Override
    public void setParams() {
        resetParams();
        putParams("UserId", AppConstant.UserId);
        putStringParams("NickName", nickName);
        putStringParams("Email", email);
        putStringParams("Phone", phone);
        putStringParams("SinaAccount", sinaAccount);
        putStringParams("QQAccount", QQAccount);
        putStringParams("WeiXinAccount", WeiXinAccount);
        putStringParams("IsPushPost", isPushPost);
        putStringParams("IsPushEstate", isPushEstate);
        putStringParams("IsPushChat", isPushChat);
        putStringParams("IsPushSystemMsg", isPushSystemMsg);
    }


    @Override
    public String getPath() {
        return "UpdateUserInfo2Request";
    }
}

